<!-- 删除订单 -->
<script>
    (function ($) {

        // 单个订单删除
        $(".js_deleteOrder, .js_changeStatus").live('click',function(e){
            e.preventDefault();
            e.stopPropagation();
            var selectId = $(this).closest("tr").attr("id");
            var roleId = $(this).closest("tr").data("id");
            if (!selectId) {
                alert('请选择要操作记录');
            }

            var clickObj = $(this);
            var url = clickObj.attr("href");
            var cardListBox = clickObj.closest('.cardListBox');
            var lines = $(this).parent().attr('rowspan');
            var notice = {if $status == 1}'确定要删除此订单吗？'{else}'确定执行此操作吗?'{/if};
            showConfirm(notice, 1, function(){
                $.post(url, {  'id':selectId }, function(json){
                    if (json.info != 'ok') {
                        alert(json.info);
                    } else {
                        clickObj.closest("tr").fadeOut(function(){
                            if (lines) {
                                for (var i = 1; i < lines; i++) {
                                    $(this).next().remove();
                                }
                            };
                            $(this).remove();
                            interLineColor();
                            {if $status == 1}
                            showMsg('删除成功!被删除订单可在回收站还原.', 1);
                            {/if}
                            if (cardListBox) {
                                var trNum = cardListBox.find('.deleteOne').length;
                                var level_total = cardListBox.attr('data-level_total');
                                consoleLog(trNum);
                                consoleLog(level_total);
                                if (trNum < level_total) {
                                    $('.addCard').show();
                                }
                            }
                            location.href = location.href;
                        });
                    }
                }, 'json');
            });
            return false;
        });

    })(jQuery);
</script>
<!-- /删除订单 -->